<HTML>
    <HEAD>
        <TITLE>華信商会(株) 販売管理業務システム</TITLE>
        <LINK href="/css/financials.css" rel="stylesheet" type="text/css">
        <meta charset="UTF-8">
        <script language="JavaScript" src="/js/Common.js"></script>
        <STYLE type="text/css">
                        <!--
                        BODY {
                             background-color: #F8F9FB;
                            margin-left: 0px;
                              margin-top: 0px;
                              margin-right: 0px;
                              margin-bottom: 0px;
                        }
                        
                        .style13 {
                            color: #FFFFFF;
                            font-weight: bold;
                        }
                        .style28 {
                            font-family: "ＭＳ ゴシック";
                            font-size: 12px;
                        }
                        -->
                </STYLE>
        <style type="text/css">
          .disabled { pointer-events: none; opacity: 0.5; }
          .main.disabled .titlefont { color: #999; }
        </style>
    <script language="JavaScript">
      function changePage(flag) {
        if(flag == "1"){
          document.getElementById("changePage1").style.display = "block";          
          document.getElementById("changePage2").style.display = "block"; 
          document.getElementById("btnSubmit"). disabled = false;                  
        }
      }     
      function onLoad() {
          document.getElementById("changePage1").style.display = "none";         
          document.getElementById("changePage2").style.display = "none";         
      } 
    </script>
    </HEAD>
    <BODY th:attr="onLoad=${#lists.isEmpty(invoices)} ? 'onLoad(),goforit()' : 'goforit(),changePage(\'1\')'">
        <TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
            <TR>
                <TD height="55" colspan="2">
                    <TABLE width=100% height="56" border=0 cellPadding=0 cellSpacing=0>
                        <TBODY>
                            <TR bordercolor="0">
                                <TD height="49" bgColor=#666666>
                                    <TABLE cellSpacing=0 cellPadding=0 width=100 border=0>
                                                                           <TBODY>
                                          <TR bordercolor="0">
                                            <TD><IMG src="/img/header_logo_rt.gif" width=1 border=0><IMG
                                                    height=1 alt="Skip to page content"
                                                    src="/img/sp.gif" width=1
                                                    border=0></TD>
                                            <TD><IMG src="/img/header_logo.gif" width="185" height="49" border="0"></TD>
                                            <TD><IMG height=49 alt="" 
                                                src="/img/header_logo_rt.gif"
                                                width=105 border=0></TD>
                                            <TD><IMG 
                                                height=49 alt="" src="/img/header_title.gif"
                                                width=329 border=0></TD>
                                           </TR>
                                        </TBODY>
                                    </TABLE>
                                </TD>
                                <TD align=right bgColor=#666666>&nbsp;
                                    
                                </TD>
                            </TR>
                            <TR align="right">
                                <TD colSpan=3 bgColor=#000000>
                                    <IMG height=5 alt="" src="/img/sp.gif">
                                    <script type="text/javascript" src="/js/time.js"
                                        language="JavaScript"></script>
                                    <span id="clock"></span>
                                </TD>
                            </TR>
                        </TBODY>
                    </TABLE>
                </TD>
            </TR>
            <TR>
                <TD width="152" height="100%" rowspan="2" valign="top"
                    bgcolor="#FFFFFF">
                    <TABLE width="152" height="501" border="0" cellpadding="0" cellspacing="0">
                        <TR>
                            <script type="text/javascript" src="/js/menu.js" language="JavaScript"></script>

                            <DIV class=main id=main5 onclick=expandIt(5)>
                                <TD width="152" height="285" valign="top" bgcolor="#FFFFFF"
                                    STYLE="border-right: 1px solid rgb(204, 204, 204);">
                                    <IMG height=11 alt="" src="/img/nav_divider.gif" width=150>
                                    <DIV class=main id=main1 onClick=expandIt(1)
                                         th:classappend="${session.loginDeptName} != '営業課' ? ' disabled' : ''">
                                        <span class="titlefont">受注管理</span>
                                        <DIV class=sub id=sub1 STYLE="display:none"
                                             th:classappend="${session.loginDeptName} != '営業課' ? ' disabled' : ''">
                                            <A th:if="${session.loginDeptName} == '営業課'" href="@{'/PR10101'}">受注入力<BR>
                                            </A>
                                            <A th:unless="${session.loginDeptName} == '営業課'" class="disabled"
                                               href="javascript:void(0)">受注入力<BR> </A>
                                            <A th:if="${session.loginDeptName} == '営業課'" th:href="@{/PR10201}">商品別出庫表作成<BR>
                                            </A>
                                            <A th:unless="${session.loginDeptName} == '営業課'" class="disabled"
                                               href="javascript:void(0)">商品別出庫表作成<BR> </A>

                                            <span class="titlefont">月報作成<IMG
                                                    src="/img/arrow_pagenext2.gif"> </span>
                                            <BR>
                                            <IMG src="/img/nav_arrow.gif">
                                            <A th:if="${session.loginDeptName} == '営業課'" href="PR10301.HTML">顧客別受注実績月報作成<BR>
                                            </A>
                                            <A th:unless="${session.loginDeptName} == '営業課'" class="disabled"
                                               href="javascript:void(0)">顧客別受注実績月報作成<BR> </A>
                                            <IMG src="/img/nav_arrow.gif">
                                            <A th:if="${session.loginDeptName} == '営業課'" th:href="@{/PR10401}">商品別受注実績月報作成<BR>
                                            </A>
                                            <A th:unless="${session.loginDeptName} == '営業課'" class="disabled"
                                               href="javascript:void(0)">商品別受注実績月報作成<BR> </A>
                                            <A th:if="${session.loginDeptName} == '営業課'"
                                               th:href="@{/PR10501}">在庫情報確認</A>
                                            <A th:unless="${session.loginDeptName} == '営業課'" class="disabled"
                                               href="javascript:void(0)">在庫情報確認</A>
                                        </DIV>
                                        <IMG height=11 alt="" src="/img/nav_divider.gif" width=150>
                                    </DIV>
                                    <DIV class=main id=main2 onClick=expandIt(2)
                                         th:classappend="${session.loginDeptName} != '経理課' ? ' disabled' : ''">
                                        <span class="titlefont">売掛管理</span>
                                        <DIV class=sub id=sub2 STYLE="display:none"
                                             th:classappend="${session.loginDeptName} != '経理課' ? ' disabled' : ''">
                                            <A th:if="${session.loginDeptName} == '経理課'" th:href="@{/PR20101}">売掛登録<BR>
                                            </A>
                                            <A th:unless="${session.loginDeptName} == '経理課'" class="disabled"
                                               href="javascript:void(0)">売掛登録<BR> </A>
                                            <A th:if="${session.loginDeptName} == '経理課'" th:href="@{/PR20201}">代金請求<BR>
                                            </A>
                                            <A th:unless="${session.loginDeptName} == '経理課'" class="disabled"
                                               href="javascript:void(0)">代金請求<BR> </A>
                                            <A th:if="${session.loginDeptName} == '経理課'" th:href="@{/PR20301}">入金登録</A>
                                            <A th:unless="${session.loginDeptName} == '経理課'" class="disabled"
                                               href="javascript:void(0)">入金登録</A>
                                        </DIV>
                                        <IMG height=11 alt="" src="/img/nav_divider.gif" width=150>
                                    </DIV>
                                    <DIV class=main id=main3 onClick=expandIt(3)
                                         th:classappend="${session.loginDeptName} != '倉庫課' ? ' disabled' : ''">
                                        <span class="titlefont">発注管理</span>
                                        <DIV class=sub id=sub3 STYLE="display:none"
                                             th:classappend="${session.loginDeptName} != '倉庫課' ? ' disabled' : ''">
                                            <A th:if="${session.loginDeptName} == '倉庫課'" th:href="@{/PR30101}">発注書作成<BR>
                                            </A>
                                            <A th:unless="${session.loginDeptName} == '倉庫課'" class="disabled"
                                               href="javascript:void(0)">発注書作成<BR> </A>
                                            <A th:if="${session.loginDeptName} == '倉庫課'" th:href="@{/PR30201}">検品入庫</A>
                                            <A th:unless="${session.loginDeptName} == '倉庫課'" class="disabled"
                                               href="javascript:void(0)">検品入庫</A>
                                        </DIV>
                                        <IMG height=11 alt="" src="/img/nav_divider.gif" width=150>
                                    </DIV>
                                    <DIV class=main id=main4 onClick=expandIt(4)
                                         th:classappend="${session.loginDeptName} != '経理課' ? ' disabled' : ''">
                                        <span class="titlefont">買掛管理</span>
                                        <DIV class=sub id=sub4 STYLE="display:none"
                                             th:classappend="${session.loginDeptName} != '経理課' ? ' disabled' : ''">
                                            <A th:if="${session.loginDeptName} == '経理課'" href="PR40101.HTML">買掛登録<BR>
                                            </A>
                                            <A th:unless="${session.loginDeptName} == '経理課'" class="disabled"
                                               href="javascript:void(0)">買掛登録<BR> </A>
                                            <A th:if="${session.loginDeptName} == '経理課'" href="PR40201.HTML">支払伝票作成</A>
                                            <A th:unless="${session.loginDeptName} == '経理課'" class="disabled"
                                               href="javascript:void(0)">支払伝票作成</A>
                                            <BR>
                                            <A th:if="${session.loginDeptName} == '経理課'" href="PR40301.HTML">支払額登録</A>
                                            <A th:unless="${session.loginDeptName} == '経理課'" class="disabled"
                                               href="javascript:void(0)">支払額登録</A>
                                        </DIV>
                                        <IMG height=11 alt="" src="/img/nav_divider.gif" width=150>
                                    </DIV>
                                    <DIV class=main id=main5 onClick=expandIt(5) th:classappend="' disabled'"><span
                                            class="titlefont">情報管理</span>
                                        <DIV class=sub id=sub5 style="display:none" th:classappend="' disabled'"><A
                                                href="PR50101.HTML">顧客情報管理<br>
                                        </A><a href="PR50201.HTML">商品情報管理</A><br>
                                            <A href="PR50301.HTML">仕入先情報管理</A><br>
                                            <A href="PR50401.HTML">担当者情報管理</A><br>
                                            <A href="/HTML/PR50501.HTML">部門情報管理</A>
                                        </DIV>

                        </TR>
                        <TR>
                            <TD height="48" valign="top" bordercolor="0">
                                <img src="/img/b.jpg" width="152" height="216" border="0" align="top">
                        </TR>
                    </TABLE>
                </TD>
                <TD height="400" align="left" valign="top">
                    <TABLE>
                        <TR>
                            <TD width="700">
                                <DIV class="header3">
                                    <BR>
                                </DIV>
                                <DIV class="bfont" align="left">
                                    ログイン：張毅
                                </DIV>
                                <BR>
                                <DIV class="bfont" align="left">
                                    売掛管理－＞入金登録
                                </DIV>
                            </TD>
                            <TD width="200">
                                <DIV class="bfont" align="right">
                                    <span class="titlefont"><A th:href="@{/}">ホーム</A> </span><span
                                        class="titlefont">｜</span>
                                    <span class="titlefont"><A th:href="@{/logout}">ログアウト</A> </span>
                                </DIV>
                            </TD>
                        </TR>
                    </TABLE>
                    <HR>
                    <div class="datafont" th:if="${errorMessage} != null" th:text="${errorMessage}"></div>
                    <div class="datafont" th:if="${successMessage} != null" th:text="${successMessage}"></div>
                    <FORM name="urikakeForm" method="post" th:action="@{/PR20301/search}">
                        <TABLE>
                            <TR>
                                <TD width="90">
                                </TD>
                                <TD>
                                    <TABLE>
                                        <TR>
                                            <TD width="867">
                                                <TABLE>
                                                    <TR align="left">
                                                        <th width="72" nowrap class="datafont">
                                                            顧客コード
                                                        </th>
                                                        <TD nowrap>
                                                            <select name="kokyaku_code" th:value="${selectedCustomerCode}" th:disabled="${not #strings.isEmpty(selectedCustomerCode)}">
                                                                <option value="" selected>顧客を選択してください</option>
                                                                <option th:each="c : ${customers}" th:value="${c}" th:text="${c}"></option>
                                                            </select>
                                                            <input type="hidden" name="kokyaku_code" th:value="${selectedCustomerCode}" th:if="${not #strings.isEmpty(selectedCustomerCode)}" />
                                                        </TD>
                                                        <TD colspan="2" nowrap class="datafont">
                                                            <input type="submit" name="submit" value="検索" th:disabled="${not #strings.isEmpty(selectedCustomerCode)}">
                                                        </TD>
                                                    </TR>
                                                    <TR align="left">
                                                        <TD nowrap class="datafont">
                                                            入金日付
                                                        </TD>
                                                        <TD nowrap>
                                                            <select name="nengou_code" mutilply>
                                                                 <option value="1">
                                                                     西暦
                                                                 </option>
                                                             </select>
                                                            <select name="kotosi" mutilply>
                                                                <option value="0"></option>
                                                                <option value="1">
                                                                    19
                                                                </option>
                                                                <option value="2">
                                                                    18
                                                                </option>
                                                                <option value="3">
                                                                    17
                                                                </option>
                                                                <option value="4">
                                                                    16
                                                                </option>
                                                            </select>
                                                            &nbsp;
                                                            <span class="datafont">年</span>
                                                            <select name="gathu" mutilply>
                                                                <option value="0"></option>
                                                                <option value="1">
                                                                    1
                                                                </option>
                                                                <option value="2">
                                                                    2
                                                                </option>
                                                                <option value="3">
                                                                    3
                                                                </option>
                                                                <option value="4">
                                                                    4
                                                                </option>
                                                                <option value="5">
                                                                    5
                                                                </option>
                                                                <option value="6">
                                                                    6
                                                                </option>
                                                                <option value="7">
                                                                    7
                                                                </option>
                                                                <option value="8">
                                                                    8
                                                                </option>
                                                                <option value="9">
                                                                    9
                                                                </option>
                                                                <option value="10">
                                                                    10
                                                                </option>
                                                                <option value="11">
                                                                    11
                                                                </option>
                                                                <option value="12">
                                                                    12
                                                                </option>
                                                            </select>
                                                            &nbsp;
                                                            <span class="datafont">月</span>
                                                            <select name="niti" mutilply>
                                                                <option value="0"></option>
                                                                <option value="1">
                                                                    1
                                                                </option>
                                                                <option value="2">
                                                                    2
                                                                </option>
                                                                <option value="3">
                                                                    3
                                                                </option>
                                                                <option value="4">
                                                                    4
                                                                </option>
                                                                <option value="5">
                                                                    5
                                                                </option>
                                                                <option value="6">
                                                                    6
                                                                </option>
                                                                <option value="7">
                                                                    7
                                                                </option>
                                                                <option value="8">
                                                                    8
                                                                </option>
                                                                <option value="9">
                                                                    9
                                                                </option>
                                                                <option value="10">
                                                                    10
                                                                </option>
                                                                <option value="11">
                                                                    11
                                                                </option>
                                                                <option value="12">
                                                                    12
                                                                </option>
                                                                <option value="13">
                                                                    13
                                                                </option>
                                                                <option value="14">
                                                                    14
                                                                </option>
                                                                <option value="15">
                                                                    15
                                                                </option>
                                                                <option value="16">
                                                                    16
                                                                </option>
                                                                <option value="17">
                                                                    17
                                                                </option>
                                                                <option value="18">
                                                                    18
                                                                </option>
                                                                <option value="19">
                                                                    19
                                                                </option>
                                                                <option value="20">
                                                                    20
                                                                </option>
                                                                <option value="21">
                                                                    21
                                                                </option>
                                                                <option value="22">
                                                                    22
                                                                </option>
                                                                <option value="23">
                                                                    23
                                                                </option>
                                                                <option value="24">
                                                                    24
                                                                </option>
                                                                <option value="25">
                                                                    25
                                                                </option>
                                                                <option value="26">
                                                                    26
                                                                </option>
                                                                <option value="27">
                                                                    27
                                                                </option>
                                                                <option value="28">
                                                                    28
                                                                </option>
                                                                <option value="29">
                                                                    29
                                                                </option>
                                                                <option value="30">
                                                                    30
                                                                </option>
                                                                <option value="31">
                                                                    31
                                                                </option>
                                                            </select>
                                                            &nbsp;
                                                            <span class="datafont">日</span>
                                                            <span class="datafont">（半角数字入力）</span>
                                                        </TD>
                                                    </TR>

                                                    <TR align="left">
                                                        <TD>
                                                            <br>
                                                        </TD>
                                                    </TR>

                                                </TABLE>
                                            </TD>
                                        </TR>

                                        <TR>
                                            <TD>
                                                <TABLE width="400" border="0" align="left"><TR><TD class="datafont">顧客名</TD><TD><input type="text" disabled th:value="${customerName}"></TD></TR><TR><TD class="datafont">売掛残高</TD><TD><input type="text" disabled th:value="${balance}"></TD></TR><TR><TD class="datafont">登録後売掛残高</TD><TD><input type="text" disabled th:value="${afterBalance}"></TD></TR></TABLE>
                                                <div id="changePage1" th:style="${#lists.isEmpty(invoices)} ? 'display:none;' : 'display:block;'">
                                                    <TABLE BORDER="0" width="512">
                                                        <caption>
                                                            <B>入金明細</B>
                                                        </caption>
                                                        <tbody>
                                                            <TR>
                                                                <th width="10%">項番</th>
                                                                <th width="25%">請求書番号</th>
                                                                <th width="35%">請求日付</th>
                                                                <th width="20%">請求額（税込）</th>
                                                                <th width="10%">選択</th>
                                                            </TR>
                                                        </tbody>
                                                    </TABLE>
                                                </div>
                                                <div id="changePage2" th:style="${#lists.isEmpty(invoices)} ? 'display:none;' : 'display:block;'">
                                                    <div class="z14">
                                                        <TABLE BORDER="0" width="512">
                                                            <tbody>
                                                                <TR th:each="row, idx : ${invoices}">
                                                                    <TD NOWRAP ALIGN="CENTER" width="10%" th:text="${idx.index + 1}"></TD>
                                                                    <TD NOWRAP ALIGN="CENTER" width="25%" th:text="${row.invoiceNo}"></TD>
                                                                    <TD NOWRAP ALIGN="CENTER" width="35%" th:text="${#dates.format(row.requestDate,'yyyy年MM月dd日')}"></TD>
                                                                    <TD NOWRAP ALIGN="RIGHT" width="20%" th:text="${row.invoiceAmount}"></TD>
                                                                    <TD NOWRAP ALIGN="CENTER" width="10%">
                                                                        <input type="checkbox" name="selectedInvoiceNos" th:value="${row.invoiceNo}">
                                                                    </TD>
                                                                </TR>
                                                            </tbody>
                                                        </TABLE>
                                                    </div>
                                                </div>
                                            </TD>
                                        </TR>
                                        <TR>
                                            <TD>
                                                <TABLE width="80%" border="0" cellpadding="5">
                                                    <TR align="center">
                                                        <TD width="25%"></TD>
                                                        <TD width="25%">
                                                            <input type="button" name="clear" value="クリア"
                                                                onclick="window.open('/PR20301','_self'); ">
                                                        </TD>
                                                        <TD width="25%">
                                                            <input type="submit" id="btnSubmit" name="btnSubmit" value="登録" th:formaction="@{/PR20301/register}" th:formmethod="post" th:disabled="${#lists.isEmpty(invoices)}">
                                                        </TD>
                                                        <TD width="25%"></TD>
                                                    </TR>
                                                </TABLE>
                                            </TD>
                                        </TR>
                                    </TABLE>
                                </TD>
                            </TR>
                        </TABLE>
            </TR>
            <TR>
              <TD align="center" valign="bottom">
                 <TABLE width="100%" border="0" align="right" cellpadding="0" cellspacing="0">
                  <TR>
                    <TD align="right" bgcolor="#F8F9FB"><DIV align="left"><IMG src="/img/eds.jpg" width="404" height="60"></DIV></TD>
                    <TD align="right" bgcolor="#F8F9FB"><IMG src="/img/sTRuts-power.gif" width="95" height="37"></TD>
                  </TR>
                  </TABLE>
               </TD>
            </TR>
            <TR>
                <TD height="10" colspan="2">
                    <TABLE width=100% border=0 cellpadding=0 cellspacing=0
                        bgcolor="#666666">
                        <tbody>
                            <TR>
                                <TD width="756" bgcolor="#000000">
                                    <span class="style13"><span class="style28">©2008 華信商会(株) 販売管理業務システム. 無断転載を禁じます</span> </span>
                                </TD>
                            </TR>
                        </tbody>
                    </TABLE>
                </TD>
            </TR>
        </TABLE>
    </BODY>
    <script language="javascript">
    	document.urikakeForm.kokyaku_code.focus();
    </script>
</HTML>
